package com.xjj.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Description 评论表
 * @Author zhangjin
 * @Date 2022/10/19 18:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("xjj_discuss")
public class Discuss {
    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("content")
    // 评论内容
    private String content;

    @TableField("sender_id")
    // 发送者id
    private Integer senderId;

    @TableField("photo_id")
    // 相册id
    private Integer photoId;

    @TableField("pid")
    // 父id
    private Integer pid;

    @TableField("time")
    // 发送时间
    private String time;

    @TableField("floor")
    // 层级
    private Integer floor;

    @TableField(exist = false)
    //子评论
    private List<Discuss> subDiscuss;

    @TableField(exist = false)
    //父评论
    private Discuss pDiscuss;

    @TableField(exist = false)
    //评论家长
    private Parent parent;
}
